package com.lr.wfxmanager.globa.controller;

import com.lr.wfxmanager.permission.bean.RoleInfo;
import com.lr.wfxmanager.permission.service.IUserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;


@Controller
@RequestMapping("page")
public class ManagerController {
    @Resource
    private IUserService iUserService;
    @RequestMapping("manager")
    public String manager(){
        return "bgManagement";
    }
    @RequestMapping("permission")
    public String permission(Model model){
       //*查询角色列表*//*
        List<RoleInfo> roleInfos = iUserService.queryAllRoleInfo();
        model.addAttribute("roleInfos",roleInfos);
        return "permission";
    }
    @RequestMapping("index")
    public String index(){
        return "index";
    }
    //登录
    @RequestMapping("login")
    public String login(){
        return "login";
    }
    //添加商户页
    @RequestMapping("addMerchant")
    public String addMerchant(){
        return "addMerchant";
    }
    //商品列表
    @RequestMapping("goods")
    public String goodsList(){
        return "goods";
    }
    //demo
    @RequestMapping("demo")
    public String demo(){
        return "demo";
    }
}
